﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Net;
using System.IO;

namespace InfoPlayas
{
    public class Conexion
    {
        private HttpWebRequest wr;
        private HttpWebResponse ws;

        public string getContent(string url)
        {
            wr = (HttpWebRequest)WebRequest.Create(url);
            ws = (HttpWebResponse)wr.GetResponse();
            StreamReader reader = new StreamReader(ws.GetResponseStream(), System.Text.Encoding.GetEncoding(ws.CharacterSet));
            return (reader.ReadToEnd());
        }
    }
}
